package org.xx.armory.swing.builders;

import org.xx.armory.objectparser.LineInfo;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

public class TabbedPaneModel
        extends AbstractComponentModel
        implements ComponentModel {
    private final List<TabModel> tabs;

    public TabbedPaneModel(
            LineInfo lineInfo,
            String name,
            boolean visible,
            Collection<TabModel> tabs
    ) {
        super(lineInfo, name, visible);

        this.tabs = tabs != null ? new ArrayList<>(tabs) : Collections.emptyList();
    }

    public final List<TabModel> getTabs() {
        return Collections.unmodifiableList(this.tabs);
    }
}
